package com.heima.model.search.dtos;

import lombok.Data;

import java.util.Date;

@Data
public class UserSearchDto {
    String searchWords;    //搜索关键字
    int pageNum;    //当前页
    int pageSize;    //分页条数
    Date minBehotTime;    //最小时间

    public int getFromIndex(){
        if(this.pageNum<1)return 0;
        if(this.pageSize<1) this.pageSize = 10;
        return this.pageSize * (pageNum-1);
    }}
